package ntd.remote.link;

import cn.hutool.core.date.DateUtil;
import cn.hutool.core.thread.ThreadUtil;
import cn.hutool.log.StaticLog;
import ntd.remote.file.ComRemoteFile;
import ntd.remote.file.bo.ComRemoteFileBO;

import static ntd.remote.link.ComRegistryClient.run;

/**
 * @author: liuwenju
 * @date: 2023/6/8 12:00
 * @version: 1.0
 */
public class Test {

    public static void main(String[] args) {
//        ThreadUtil.execAsync(() -> run("client-test", "测试客户端", "127.0.0.1", 39100));
        ThreadUtil.execAsync(() -> run("client-test", "测试客户端", "61.52.247.249", 13021));
//        ThreadUtil.sleep(3000);
//
        ComRemoteFileBO comRemoteFileBO = new ComRemoteFileBO();
        comRemoteFileBO.setPath("D:\\AI_result");
////        comRemoteFileBO.setPath("D:\\work-file");
        comRemoteFileBO.setRemoteCode("client-ai-server");
////        comRemoteFileBO.setRemoteCode("client-test");
////        ComRemoteFile.me.add(comRemoteFileBO, FileUtil.readBytes("C:\\Users\\17391\\\\Desktop\\1683179587653.png"));
////        ComRemoteFile.me.loopListFiles(comRemoteFileBO);
        comRemoteFileBO.setDateTime(DateUtil.parseDateTime("2023-07-10 12:00:00"));
//
        ComRemoteFile.me.del(comRemoteFileBO);
////        List<ComRemoteFileBO> remoteFileBOS = ComRemoteFile.me.loopListFiles(comRemoteFileBO);
////        StaticLog.info("执行完成[{}][{}]...", remoteFileBOS.size(), remoteFileBOS);
        StaticLog.info("执行完成...");

//        StaticLog.info(DateUtil.date(1440280185031l).toDateStr());
    }
}
